/**
 * 管理员相关state
 */
import { atom } from "recoil";
import { LoginUserRes } from "../service/auth/auth-service";

export const initialState: LoginUserRes = {
  token: "",
  userInfo: {
    sysId: "0",
    sysName: "",
    sysPassword: "",
    createTime: "",
    updateTime: "",
    sysAvater: "",
    unitId: "",
    sysRoleId: 0,
    phone: "",
    sysRole: {
      sysRoleId: 0,
      sysRoleName: "",
      sysRolePermisstion: "",
      createTime: "",
      updateTime: "",
    },
  },
  route: [],
};

export const userState = atom({
  key: "userState",
  default: initialState,
});
